
// create a new stack
function weStack(fPush,fPop){
this.iCnt	=0;		//stack counter
this.aStack	=new Array();
this.fPush	=fPush;	//push method
this.fPop	=fPop;	//pop method
}
weStack.prototype.mPush=function(aPara){
if(this.fPush){
	if(this.fPush(aPara,this.aStack[this.iCnt])){this.iCnt++;return true};
	return false;
}
this.aStack[this.iCnt++]=aPara;
return true;
}
weStack.prototype.mPop=function(){
if(this.iCnt==0)return false;
this.iCnt--;
if(this.fPop){
	return this.fPop(this.aStack[this.iCnt]);
}
return this.aStack[this.iCnt];
}

var aStack=new Array();
aStack.top=0;

function wePush(zCmd){
return alert("不再使用 wePush");
var o=(aStack[aStack.top++]=new Array());
switch(zCmd){
case "loaf":
	o.oLoaf=fmTree.loafCfg.oMain;
	o.zTool=null;
	return;
case "tool":
	o.oLoaf=null;
	o.zTool=fmTool.document.URL;
	return;
default:
	o.oLoaf=fmTree.loafCfg.oMain;
	o.zTool=fmTool.document.URL;
	return;
}
}
function wePop(){
return alert("不再使用 wePush");
if(aStack.top==0)return;
var o=aStack[--aStack.top];
//fmMain.document.body.innerHTML="";
if(o.oLoaf){fmTree.wlActLoaf(o.oLoaf);}
if(o.zTool){fmTool.document.location=o.zTool;}
aStack[aStack.top]=null;
}
